package org.xandroid.util;

import android.content.Context;
import android.widget.Toast;

/**
 * Toast helper class, providing two static method to show toast. 
 * @author Kross(krossford@foxmail.com)
 * @date 2013-12-24 16:10:04
 * */
public class XToastHelper {
	
	/**
	 * show a toast message
	 * @param context a context object from a component
	 * @param resId string resource id
	 * */
	public static void show(Context context, int resId) {
		show(context, context.getString(resId));
	}
	
	/**
	 * show a toast message
	 * @param context a context object from a component
	 * @param content message will be showed
	 * */
	public static void show(Context context, String content) {
		Toast.makeText(context, content, Toast.LENGTH_SHORT).show();
	}
}